package com.cnpc.bds.sdk.sink.kafka.handler.converter;

import com.alibaba.fastjson.JSONObject;
import com.cnpc.bds.sdk.sink.kafka.handler.AbstractHandler;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class ObjToBytesConverter extends AbstractHandler<Object, byte[]> {

    @Override
    public byte[] handle(final Object msg) {
        log.debug("--->handle: {}", msg);
        return JSONObject.toJSONBytes(msg);
    }
}
